import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common'
import { CalculateTowerService } from './calculate-tower.service'
import { CreateCalculateTowerDto } from './dto/create-calculate-tower.dto'
import { UpdateCalculateTowerDto } from './dto/update-calculate-tower.dto'

@Controller('calculate-tower')
export class CalculateTowerController {
  constructor(private readonly calculateTowerService: CalculateTowerService) {}

  @Post()
  create(@Body() createCalculateTowerDto: CreateCalculateTowerDto) {
    return this.calculateTowerService.create(createCalculateTowerDto)
  }

  @Get()
  findAll(@Query() args: Record<string, any>) {
    return this.calculateTowerService.findAll(args)
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.calculateTowerService.findOne(+id)
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateCalculateTowerDto: UpdateCalculateTowerDto) {
    return this.calculateTowerService.update(+id, updateCalculateTowerDto)
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.calculateTowerService.remove(+id)
  }
}
